package com.mt.restaurant.dao.sale;

import com.mt.common.core.web.base.PageDTO;
import com.mt.common.core.web.base.PageResultDTO;
import com.mt.restaurant.entity.sale.MenuMaterialRelationShip;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
@Component(value = "menuMaterialRelationShipDao")
public interface MenuMaterialRelationShipDao {

    /**
    * 根据分页参数查询菜谱材料关系集合
    *
    * @param pageDTO 分页条件
    */
    public List<MenuMaterialRelationShip> findMenuMaterialRelationShips(PageDTO pageDTO);

    /**
    * 查询全部菜谱材料关系集合
    *
    */
    public List<MenuMaterialRelationShip> findAllMenuMaterialRelationShips();

    /**
    * 查询所有菜谱材料关系集合(只提取ID 和 Name)
    *
    */
    public List<MenuMaterialRelationShip> findAllMenuMaterialRelationShipsWithIdName();

    /**
    * 根据名称查询菜谱材料关系集合(只提取ID 和 Name)
    *
    * @param menuMaterialRelationShipName 名称
    */
    public List<MenuMaterialRelationShip> findMenuMaterialRelationShipsWithIdNameByName(@Param("menuMaterialRelationShipName") String menuMaterialRelationShipName);

    /**
    * 根据ID查询指定的菜谱材料关系(只提取ID 和 Name)
    *
    * @param menuMaterialRelationShipId Id
    */
    public MenuMaterialRelationShip findMenuMaterialRelationShipsWithIdNameById(@Param(" menuMaterialRelationShipId") Long menuMaterialRelationShipId);

    /**
    * 根据分页参数查询菜谱材料关系集合的数量
    *
    * @param pageDTO 分页条件
    */
    public Long findMenuMaterialRelationShipTotalCount(PageDTO pageDTO);

    /**
    * 根据ID查询指定的菜谱材料关系
    *
    * @param menuMaterialRelationShipId Id
    */
    public MenuMaterialRelationShip findMenuMaterialRelationShip(@Param("menuMaterialRelationShipId") Long menuMaterialRelationShipId);

    /**
    * 根据ID查询指定的菜谱材料关系(包含外键)
    *
    * @param menuMaterialRelationShipId Id
    */
    public MenuMaterialRelationShip findMenuMaterialRelationShipWithForeignName(@Param("menuMaterialRelationShipId") Long menuMaterialRelationShipId);

    /**
    * 新增菜谱材料关系
    *
    * @param menuMaterialRelationShip 实体对象
    */
    public Long saveMenuMaterialRelationShip(MenuMaterialRelationShip menuMaterialRelationShip);

    /**
    * 更新菜谱材料关系
    *
    * @param menuMaterialRelationShip 实体对象
    */
    public Long updateMenuMaterialRelationShip(MenuMaterialRelationShip menuMaterialRelationShip);

    /**
    * 根据ID删除菜谱材料关系
    *
    * @param menuMaterialRelationShipId ID
    */
    public Long deleteMenuMaterialRelationShip(@Param("menuMaterialRelationShipId") Long menuMaterialRelationShipId);

    void batchSave(@Param("menuMaterialRelationShips") List<MenuMaterialRelationShip> menuMaterialRelationShips);
}
